package com.dropdb.demo.controller.admin;

import com.dropdb.demo.bean.bo.BaseData;
import com.dropdb.demo.bean.vo.BaseRespVO;
import com.dropdb.demo.service.FeedbackService;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author:tanxin Desc:
 * @date:2020/6/27 9:20
 */
@RestController
public class AdminFeedbackController {
    @Resource
    FeedbackService feedbackService;
    @RequestMapping("/admin/feedback/list")
    @RequiresPermissions(value = {"*", "admin:feedback:list"}, logical = Logical.OR)
    public BaseRespVO queryFeedback(Integer page,Integer limit,String sort,String order, Integer id, String username){

        BaseData baseData = feedbackService.queryFeedback(page, limit, sort, order, id, username);
        return BaseRespVO.ok(baseData);
    }
}
